extends "../cTDP/cTDP.gd"
func _info():
	pass

func _connect():
	._connect()

func _extInit():
	._extInit()
	chaName = "萨满"
	lv = 2
	attCoe.atkRan = 3
	attCoe.atk = 10 / 8.5 * 2 / 2
	attCoe.maxHp = 700 / 112.5 / 2
	addSkillTxt("萨满图腾：开局随机召唤一个图腾[图腾附加自身50/55/60%血量;10秒后消失]")

func _onBattleStart():
	._onBattleStart()
	var n = 1
	if sys.test:n = 29
	for j in range(n):
		var ids = str(sys.rndRan(1,3))
		ids = "cex___Hide_totem" + ids
		var ncha = newChara(ids,self.cell)
		if !ncha:
			var cells = utils.getAllyCells(team)
			for i in cells:
				ncha = newChara(ids,i)
				if ncha:break
		if ncha:
			var p = (lv-2) * 0.05 + 0.5
			ncha.attInfo.maxHp += att.maxHp * p
			ncha.upAtt()
			ncha.plusHp(ncha.att.maxHp)
			ncha.addBuff(boom.new(1))
		#yield(reTimer(0.01),"timeout")
class boom:
	extends Buff
	func _init(lv):
		attInit()
		id = "totem_boom"
		life = 10 * lv
	func _del():
		._del()
		if masCha != null:
			masCha.plusHp(-masCha.attInfo.maxHp * 2)
			masCha.hurtChara(masCha,0)